<template>
    <div>
      <div class="title">
        {{detail.title}}
      </div>
      <div>
        <img class="newImg" :src="detail.img" alt="">
      </div>
      <div class="detail">
        &nbsp;&nbsp;&nbsp;&nbsp;
        {{detail.detail}}
      </div>
    </div>
</template>

<script>
    export default {
        name: "detail",
      data(){
        return {
          detail:{}
        }
      },
      created(){
          //假id，妈的没用
          // console.log(this.$route.params);
        this.$axios.get('news/detail')
          .then(res => {
            this.detail = res.data.detail;
          })
          .catch(err => {
            console.log(err);
          })
      }

    }
</script>

<style scoped>
  .title{
    text-align: center;
    color: #007aff;
    font-size: 18px;
    margin-top: 20px;
  }
  .newImg{
    width: 100%;
  }
  .detail{
    font-size: 16px;
    color: #8f8f94;
  }
</style>
